<?php
class Profiles extends CI_Controller {

	public function __construct() { parent::__construct(); }
	function index () {
		$this->load->model ('profiles_model');
		$data = $this->profiles_model->view_entry ();
			// $data['res'] = $res;
			
			$data = $data[0];
			//do  not forget fix up $row firstname and $row lastname
		//	$data['title'] = 'Profile of ' . $row->firstname . ' ' . $row->lastname;
		//	$data['heading'] = $row->firstname.' '.$row->lastname;
		
		$this->load->view ('profiles', $data);
	}
		
	function browse () {
		$this->load->model ('profiles_model');
		$res = $this->profiles_model->browse_entry ();
	
		$data['res'] = $res;

		$data['heading'] = 'Scholars';
		$data['title'] = 'Browse Scholars';
		
		//loop through $res as $row //stuff comes from students_profiles
		$this->load->view ('profiles_browse', $data);
		}
}
?>